package git.soulbgm.thread;

import git.soulbgm.pojo.ClearAlarmInfo;
import git.soulbgm.service.AlarmInfoService;

/**
 * 处理消除告警信息线程
 *
 * @author SoulBGM
 * @date 2023-04-25
 */
public class ClearAlarmInfoThread implements Runnable {

    private final AlarmInfoService alarmInfoService;
    private final ClearAlarmInfo clearAlarmInfo;

    public ClearAlarmInfoThread(ClearAlarmInfo clearAlarmInfo, AlarmInfoService alarmInfoService) {
        this.clearAlarmInfo = clearAlarmInfo;
        this.alarmInfoService = alarmInfoService;
    }

    @Override
    public void run() {
        if (clearAlarmInfo != null) {
            alarmInfoService.clearAlarmInfoHandle(clearAlarmInfo);
        }
    }

}
